<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ page import="javax.portlet.*"%>
<%@page import ="rai.dto.*" %>
<%@page import ="rai.dao.*" %>
<%@page import = "java.util.*" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

<portlet:defineObjects />
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Personal Information Tracking System</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<script type="text/javascript" src='<%=request.getContextPath() +"/js/calendarDateInput.js"%>'></script>
<script type="text/javascript">
    function getForm(namespace, name) {
        return document.forms[namespace + name];
    }
    function back_to_manacc(namespace, name) {
		var frm = getForm(namespace, name);
		frm.txtAction.value = "back_to_manacc";
		frm.submit();
	}
    function submitForm(namespace, name) {
        var frm = getForm(namespace, name);
        frm.txtAction.value = "edit_acc";
        frm.submit();
    }
    function reset_pass(namespace, name) {
        var frm = getForm(namespace, name);
        frm.txtAction.value = "reset_pass";
        frm.submit();
    }
   
</script>


<link href='<%=request.getContextPath()+"css/style.css"%>' rel="stylesheet" type="text/css" media="screen" /></head>

<body>
<form name="<portlet:namespace/>editAcc" action="<portlet:actionURL/>" method="POST">
	<input type="hidden" name="txtAction" />
<table align="center">
	<tr class="title">
			<td>	
					<h1><font color="blue">Personal information tracking system</font></h1>
					<p>exploit the value of data</p>
					<hr />
			</td>
	</tr>
	
	<tr>				
		<td>
			<table border="1" width="100%" align="center" cellpadding="2" cellspacing="2">
				<tr>
					<td colspan="2"><h2 class="title" align="center"><font color="orange">AddACC</font></h2></td>
				</tr>
				<tr>
					<td><em>Account Information</em></td>
				</tr>
				<tr>
					<td>
					<table border="1" width="100%">
						<tr>
							<td>UserName</td>
							<td><input name="txtUserName" type="text" 
							    value='${sessionScope.editUsername}' /></td>
						</tr>
						<tr>
							<td>Password</td>
							<td><a href="#" onclick="reset_pass('<portlet:namespace/>','editAcc','${sessionScope.editEmpID}')">ResetPass</a></td>
							
						</tr>
						<tr>
							<td>Role</td>
							<td><select name="lstRole">
								<option value="PM">Project Manager</option>
								<option value="Emp">Employee</option>
								<option value="Undefined">Disabled</option>
							</select></td>
							
						</tr>
					</table>
					</td>
				</tr>
				
				<tr>
							<td>	<input type="button" name="btnUpdate" value="Update" 
									onclick="submitForm('<portlet:namespace/>','editAcc')" />
									<input type="button" name="btnCancel" value="Cancel" 
									onclick="back_to_manacc('<portlet:namespace/>','editAcc')" />
									<p style=""><b><font color="red">${sessionScope.succMess}</font></b></p>
							</td>
							
						</tr>
			</table>
		</td>
	</tr>
	
	<tr>
		<td colspan="2">
			<div style="clear: both;">&nbsp;</div>

			<div id="footer"><p>Development by HCMUT-Group3.</p>
			</div>
		</td>
	</tr>
</table>
</form>
</body>

